//
//  MeCollectionViewCell.m
//  项目A_百思不得姐
//
//  Created by wudongyang on 16/5/25.
//  Copyright © 2016年 wudongyang. All rights reserved.
//

#import "MeCollectionViewCell.h"
#import "UIImageView+WebCache.h"
@implementation MeCollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self doSubViews];
    }
    return self;
}


-(void)doSubViews{
    self.typeImageV = [[UIImageView alloc] init];
    self.typeImageV.backgroundColor = [UIColor clearColor];
    [self.contentView addSubview:_typeImageV];
    
    self.typeLabel = [[UILabel alloc] init];
    self.typeLabel.backgroundColor = [UIColor clearColor];
    self.typeLabel.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:_typeLabel];


}
-(void)layoutSubviews{
    [super layoutSubviews];
    self.typeImageV.frame = CGRectMake(15, 5, 60, 60);
    self.typeLabel.frame = CGRectMake(0, 65, 90, 25);
}
-(void)setSqModel:(squareModel *)sqModel{
    _sqModel = sqModel;
    [self.typeImageV sd_setImageWithURL:[NSURL URLWithString:_sqModel.icon] placeholderImage:[UIImage imageNamed:@"tupian1.jpeg"]];
    self.typeLabel.text = _sqModel.name;
}






@end
